/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package myfirstjunit;

/**
 *
 * @author x00095247
 */
public class MyFirstJunit 
{
     public static String grade(int exam, int ca) 
    {
        String grade = new String();
        if (exam < 40 || ca < 40) {
            grade = "Component Fail";
        } else {
            int combined = (60 * exam + 40 * ca) / 100;
            if (combined < 60) {
                grade = "Fail";
            } else if (combined >= 60 && combined <= 80) {
                grade = "Pass";
            } else if (combined > 80 && combined < 100) {
                grade = "Pass with distinction";
            }
        }
        return grade;
    }
    public static void main(String[] args) 
    {
    

   
    }
}